\begin{tikzpicture}
\node (a) at (0,0){正规文法$\rm{G(Z):A\rightarrow A}$|$\varepsilon$};
\node (a1) at ([xshift=-3em,yshift=0em]a.west){【例3.1】};
\node (b) at ([xshift=0em,yshift=-2em]a.south) {$\because$ $\mathrm{A\Rightarrow \varepsilon}$;};
\node (c) at ([xshift=9em,yshift=-2em]b.south) {$\rm{A\Rightarrow a A\Rightarrow a a A\Rightarrow a a a A\Rightarrow \ldots\Rightarrow a^{n}}$,$n \geqslant0$};
\node (d) at ([xshift=2em,yshift=-4.5em]b.south){$\therefore$ $\mathrm{L(G)}=\left\{a^{n} \mid n \geqslant 0\right\}$};
\node (e) at ([xshift=2em,yshift=-2em]d.south){【例3.2】$\rm{L 1=\left\{a^{m} b^{n} \mid m \geqslant 0, n \geqslant 1\right\}}$,正规语言？};
\node (f) at ([xshift=-2em,yshift=-2em]e.south){$\because$可由正规文法定义:};
\node (g) at ([xshift=2em,yshift=-2em]f.south){$\mathrm{G 1}(\mathrm{S}): \quad \mathrm{S} \rightarrow \mathrm{aS}|\mathrm{bA} ; \mathrm{A} \rightarrow \mathrm{bA}| \varepsilon$};
\node (h) at ([xshift=-1em,yshift=-5em]f.south){$\therefore$ L1是正规语言};
% \node [rectangle,draw] (d) at ([xshift=-2em,yshift=3em]a1.west){b:=a+2*5};
% \node (e) at ([xshift=-1em,yshift=0em]d.west){如:};
% \draw[yellow!60, -{Triangle[width = 18pt, length = 8pt]}, line width = 10pt] ([xshift=8em,yshift=-4em]a1.east) -- ([xshift=11em,yshift=-4em]a1.east);
% \node (e) at ([xshift=9.2em,yshift=-3em]a1.east){或};
\node(b1)[draw,fill=yellow!30,rectangle callout,callout relative pointer={(-1,-0.5)},rounded corners,align=center] at ([xshift=4em,yshift=2.5em]a.east) {正规文法};
\node(c1)[draw,fill=yellow!30,rectangle callout,callout relative pointer={(-1,0)},rounded corners,align=center] at ([xshift=5em,yshift=0em]d.east) {正规语言};
\begin{pgfonlayer}{background}
\node [fill=red!5,fit=(a)] {};
\end{pgfonlayer}
\begin{pgfonlayer}{background}
\node [fill=red!20,fit=(d)] {};
\end{pgfonlayer}
\end{tikzpicture}